Skip to content

docs: Code Coverage badge with the pytest logo, next to the README title - #24

Merged
Akinzou merged 1 commit into
masterfrom
docs/coverage-badge-title
Nov 12, 2026
Merged

Akinzou merged 1 commit into
masterfrom
docs/coverage-badge-title

Conversation

@Akinzou

@Akinzou Akinzou commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Moves the coverage badge next to the PythonMetaTrader5 title and labels it Code Coverage with the pytest logo, as the owner asked. It still links to the full line-by-line report at https://akinzou.github.io/MetaTrader5-Python/coverage/.

  • scripts/coverage_badge.py writes label: Code Coverage, namedLogo: pytest, logoColor: white. The README badge reads them from the site's coverage.json, which the docs deploy updates.

Verification: ruff, mypy, pytest (434 passed, 100.00% coverage), file length, mkdocs build --strict, publish dry run with twine check --strict. A preview render was checked visually.

/code-review high: 4 findings. Fixed: the logo comment wrongly said pytest measures the number (coverage.py does, through pytest-cov), and a comment duplicated in the test. Kept as the owner decided: the badge in the H1 (its alt text joins the heading for screen readers) and the title-case label.

…title

The owner's call: the measured coverage is shown in the title line, labelled
"Code Coverage", rather than in the row of badges below it. The badge still
links to the full report on the docs site.

Chose pytest's logo over a coverage service's because the tests run under
pytest (coverage.py, which has no logo, measures them through pytest-cov),
and a service's logo would suggest one this project does not use.

Residual risk, accepted by the owner: the badge's alt text joins the H1, so
screen readers read "PythonMetaTrader5 Code Coverage".
@Akinzou
Akinzou merged commit f7961ef into master Nov 12, 2026
12 checks passed
@Akinzou
Akinzou deleted the docs/coverage-badge-title branch November 14, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant